import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';

class SpinkitPage extends StatelessWidget {
  SpinkitPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("测试SpinKit"),
        centerTitle: true,
        elevation: 0.0,
      ),
      body: _buildBody(),
    );
  }

  Widget _buildBody() {
    return GridView(
      gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
        crossAxisCount: 3,
        childAspectRatio: 1.0,
        crossAxisSpacing: 0.5,
        mainAxisSpacing: 0.5,
      ),
      children: <Widget>[
        Column(
          children: <Widget>[
            SpinKitChasingDots(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("ChasingDots"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitCircle(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("Circle"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitCubeGrid(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("CubeGrid"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitDoubleBounce(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("DoubleBounce"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitDualRing(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("DualRing"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitFadingCircle(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("FadingCircle"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitFadingCube(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("FadingCube"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitFadingFour(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("FadingFour"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitFadingGrid(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("FadingGrid"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitFoldingCube(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("FoldingCube"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitHourGlass(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("KitHourGlass"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitPouringHourGlass(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("PouringHourglass"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitPulse(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("Pulse"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitPumpingHeart(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("PumpingHeart"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitRing(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("Ring"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitRipple(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("Ripple"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitRotatingCircle(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("RotatingCircle"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitRotatingPlain(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("RotatingPlain"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitSpinningCircle(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("SpinningCircle"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitSquareCircle(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("SquareCircle"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitThreeBounce(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("ThreeBounce"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitWanderingCubes(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("WanderingCubes"),
          ],
        ),
        Column(
          children: <Widget>[
            SpinKitWave(
              color: Colors.deepOrangeAccent,
            ),
            SizedBox(
              height: 20.0,
            ),
            Text("Wave"),
          ],
        ),
      ],
    );
  }
}
